{% extends "xadmin/base_site.html" %}
{% load i18n %}
{% load url from future %}
{% load xadmin_tags %}
{% load crispy_forms_tags %}

{% block breadcrumbs %}
{% if account_view %}
<ul class="breadcrumb">
  <li><a href="{% url 'xadmin:index' %}">{% trans 'Home' %}</a></li>
  <li class="active">{% trans 'My Information' %}</li>
</ul>
{% else %}
<ul class="breadcrumb">
  <li><a href="{% url 'xadmin:index' %}">{% trans 'Home' %}</a></li>
  <li>
    {% if has_view_permission %}
    <a href="{% url opts|admin_urlname:'changelist' %}">{{ opts.verbose_name_plural|capfirst }}</a>
    {% else %}{{ opts.verbose_name_plural|capfirst }}{% endif %}
  </li>
  <li><a href="{% url opts|admin_urlname:'change' original.pk %}">{{ original|truncatewords:"18" }}</a></li>
  <li class="active">{% trans 'Change password' %}</li>
</ul>
{% endif %}
{% endblock %}

{% block content-nav %}
{% endblock %}
{% block content %}
<!--页面设计在这儿....{{ serverval }}-->
    <style>
    .tb_tr{height: 50px; border:gainsboro 1px  double;}
    .tb_td{height: 50px; border: gainsboro 1px double; width:80px;}
    </style>
    <table style="width: 100%">
        <tr class="tb_tr">
            <td class="tb_td">账号：</td>
            <td>{{ username }}</td>
        </tr>
        <tr class="tb_tr">
            <td class="tb_td">总提成：</td>
            <td>{{ allmoney }}</td>
        </tr>
{#    <tr class="tb_tr">#}
{#            <td class="tb_td">代理数：</td>#}
{#            <td>{{ agentnum_all }}&nbsp;&nbsp;&nbsp;&nbsp;直属：{{ agentnum_next }}</td>#}
{#        </tr>#}
    <tr class="tb_tr">
            <td class="tb_td">会员数：</td>
            <td>{{ usernum_all }}</td>
        </tr>
    </table>
    <script src="/websys/static/zclip/jquery.zclip.min.js"></script>

    <script>
    function enterGame()
    {
        window.location.href=$('#la_link').val();
    }
    //复制到剪切板js代码

        function copyToClipBoard(s) {

            //alert(s);

            if (window.clipboardData) {

                window.clipboardData.setData("Text", s);

                alert("已经复制到剪切板！"+ "\n" + s);

            } else if (navigator.userAgent.indexOf("Opera") != -1) {

                window.location = s;

            } else if (window.netscape) {

                try {

                    netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");

                } catch (e) {

                    alert("被浏览器拒绝！\n请在浏览器地址栏输入'about:config'并回车\n然后将'signed.applets.codebase_principal_support'设置为'true'");

                }

                var clip = Components.classes['@mozilla.org/widget/clipboard;1'].createInstance(Components.interfaces.nsIClipboard);

                if (!clip)

                    return;

                var trans = Components.classes['@mozilla.org/widget/transferable;1'].createInstance(Components.interfaces.nsITransferable);

                if (!trans)

                    return;

                trans.addDataFlavor('text/unicode');

                var str = new Object();

                var len = new Object();

                var str = Components.classes["@mozilla.org/supports-string;1"].createInstance(Components.interfaces.nsISupportsString);

                var copytext = s;

                str.data = copytext;

                trans.setTransferData("text/unicode", str, copytext.length * 2);

                var clipid = Components.interfaces.nsIClipboard;

                if (!clip)

                    return false;

                clip.setData(trans, null, clipid.kGlobalClipboard);

                alert("已经复制到剪切板！" + "\n" + s)

            }

        }
    function setCopy()
    {
        $("#bt_copy").zclip({
                path:'/websys/static/zclip/ZeroClipboard.swf',
                copy:$('#la_link').html()
        });
alert(111)
    }
    //setCopy();
    function toCopy()
    {   copyToClipBoard($('#la_link').html());
        return;
        var t_link=$('#la_link').html();
        //alert(t_link);
{#        var Url2=document.getElementById("la_link");#}
{#        Url2.select(); // 选择对象#}
{#        document.execCommand("Copy"); // 执行浏览器复制命令#}
        window.clipboardData.setData("Text",t_link);
        alert("已复制好，可贴粘。");
    }
    /**
   * 复制文本
   * @param id 复制节点Id   该节点不能隐藏
   */
  function copyText(id){
      //获取节点
      var n = $("#" + id);
      if(n == null){
          //节点为空直接返回
         return;
     }alert(n);alert(n.html());
     try {
         //取得浏览器的userAgent字符串
         var userAgent = navigator.userAgent;
         //判断Ie
         if (userAgent.indexOf("MSIE") > 0){
             window.clipboardData.setData('text', n.html());
             var copyContent = window.clipboardData.getData("text");alert(copyContent);
             //判断复制成功，ie复制可选择是否允许
             if(copyContent == n.html()){
                 alert("复制成功。现在您可以粘贴（Ctrl+v）到Blog 或BBS中了!");
                 return;
             }
         }else{
             n.select();
             therange = void 0;
             if (n.createTextRange) therange = n.createTextRange();
             therange = therange ? therange : document;
             if (therange.execCommand("Copy")) {
                 alert("复制成功。现在您可以粘贴（Ctrl+v）到Blog 或BBS中了");
                 return;
             }
         }
     } catch (i) {
     }
     alert("您使用的浏览器不支持此复制功能，请使用Ctrl+C或鼠标右键。");
 }
    </script>
{% endblock %}
